package com.ddx.common.enums;

public enum OrderStatus {

	DAIFUKUAN(0, "待付款"),
    DAIFAHUO(1, "待发货"),
	DAISHOUHUO(2, "待收货"),
    DAIPINGJIA(3, "待评价"),
    SHOUHOU(4, "售后"),
    YISHOUQING(5, "已售罄"),
    QUXIAO(6, "订单取消");

    private int value;
    private String desc;

    OrderStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static OrderStatus getOrderStatus(int value) {
        OrderStatus[] userStatus = OrderStatus.values();
        for (OrderStatus userStatu : userStatus) {
            if (userStatu.getValue() == value) {
                return userStatu;
            }
        }
        return null;
    }

}
